package com.pap.spidemo.demo.service.impl;

import com.pap.base.util.string.StringUtilss;
import com.pap.obj.vo.logineduser.LoginedUserVO;
import com.pap.spidemo.demo.service.IItemPrice;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;

@Component
public class AppleItemPriceImpl implements IItemPrice {
    @Override
    public BigDecimal price(String itemId) {
        System.out.println("这是Apple商品编号:" + itemId);
        return new BigDecimal("924099504.0");
    }

    @Override
    public Boolean conditionVerify(LoginedUserVO loginedUserVO) {
        return StringUtilss.isNotEmpty(loginedUserVO.getClientLicenseId()) && loginedUserVO.getClientLicenseId().equals("apple");
    }

    @Override
    public int order() {
        return 100;
    }
}